//
//  BLOrderModel.m
//  blanket
//
//  Created by Mac on 2018/1/11.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "BLOrderModel.h"

@implementation BLOrderModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
    return @{@"orderID":@"id"};
}
- (NSString*)allGrade{
    CGFloat grade = 0;
    for (BLGoodModel * model in self.goods) {
        grade = grade +  model.num.integerValue * model.grade.floatValue;
    }
    return @(grade).description;
}
- (NSString*)allMoney{
    CGFloat money = 0;
    for (BLGoodModel * model in self.goods) {
        money = money +  model.num.integerValue * model.money.floatValue;
    }
    return @(money).description;
}
- (NSString*)allpoint{
    CGFloat point = 0;
    for (BLGoodModel * model in self.goods) {
        point = point +  model.num.integerValue * model.score.floatValue;
    }
    return @(point).description;
}
@end

@implementation BLGoodModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
    return @{@"goodID":@"id"};
}
@end
